<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>&lt;GChecksum&gt;: </title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.2">
<link rel="home" href="index.html" title="">
<link rel="up" href="ch01.html" title="GLib">
<link rel="prev" href="re05.html" title="&lt;GBytes&gt;">
<link rel="next" href="re07.html" title="&lt;%GLibChecksumType&gt;">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="re05.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="re07.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="id-1.1.7"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>&lt;GChecksum&gt;</h2>
<p>&lt;GChecksum&gt;</p>
</div>
<div class="refsect1">
<a name="id-1.1.7.2"></a><h2>Description</h2>
<p>An opaque structure representing a checksumming operation.
</p>
<p>To create a new GChecksum, use <code class="function">g_checksum_new()</code>. To free
a GChecksum, use <code class="function">g_checksum_free()</code>.</p>
</div>
<div class="refsect1">
<a name="id-1.1.7.3"></a><h2>Functions</h2>
<div class="refsect2">
<a name="id-1.1.7.3.2"></a><h3>copy</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (checksum:copy self))
</pre></div>
<p>Copies a <span class="type">GChecksum</span>. If <em class="parameter"><code>checksum</code></em> has been closed, by calling
<code class="function">g_checksum_get_string()</code> or <code class="function">g_checksum_get_digest()</code>, the copied
checksum will be closed as well.</p>
<div class="refsect3">
<a name="id-1.1.7.3.2.4"></a><h4>Parameters</h4>
<div class="informaltable"><table><tr>
<td class="parameter_name"><p>checksum</p></td>
<td class="parameter_description">
<p>the <span class="type">GChecksum</span> to copy</p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr></table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.7.3.3"></a><h3>free</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (checksum:free self))
</pre></div>
<p>Frees the memory allocated for <em class="parameter"><code>checksum</code></em>.</p>
<div class="refsect3">
<a name="id-1.1.7.3.3.4"></a><h4>Parameters</h4>
<div class="informaltable"><table><tr>
<td class="parameter_name"><p>checksum</p></td>
<td class="parameter_description">
<p>a <span class="type">GChecksum</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr></table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.7.3.4"></a><h3>get-string</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (checksum:get-string self))
</pre></div>
<p>Gets the digest as a hexadecimal string.
</p>
<p>Once this function has been called the <span class="type">GChecksum</span> can no longer be
updated with <code class="function">g_checksum_update()</code>.
</p>
<p>The hexadecimal characters will be lower case.</p>
<div class="refsect3">
<a name="id-1.1.7.3.4.6"></a><h4>Parameters</h4>
<div class="informaltable"><table><tr>
<td class="parameter_name"><p>checksum</p></td>
<td class="parameter_description">
<p>a <span class="type">GChecksum</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr></table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.7.3.5"></a><h3>reset</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (checksum:reset self))
</pre></div>
<p>Resets the state of the <em class="parameter"><code>checksum</code></em> back to its initial state.</p>
<div class="refsect3">
<a name="id-1.1.7.3.5.4"></a><h4>Parameters</h4>
<div class="informaltable"><table><tr>
<td class="parameter_name"><p>checksum</p></td>
<td class="parameter_description">
<p>the <span class="type">GChecksum</span> to reset</p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr></table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.7.3.6"></a><h3>update</h3>
<div class="informalexample"><pre class="programlisting">(define-values () (checksum:update self data))
</pre></div>
<p>Feeds <em class="parameter"><code>data</code></em> into an existing <span class="type">GChecksum</span>. The checksum must still be
open, that is <code class="function">g_checksum_get_string()</code> or <code class="function">g_checksum_get_digest()</code> must
not have been called on <em class="parameter"><code>checksum</code></em>.</p>
<div class="refsect3">
<a name="id-1.1.7.3.6.4"></a><h4>Parameters</h4>
<div class="informaltable"><table>
<tr>
<td class="parameter_name"><p>checksum</p></td>
<td class="parameter_description">
<p>a <span class="type">GChecksum</span></p>
<p>Passed as <code class="code">self</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description">
<p>buffer used to compute the checksum</p>
<p>Passed as <code class="code">data</code></p>
</td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description">
<p>size of the buffer, or -1 if it is a null-terminated string.</p>
<p>Inferred from <code class="code">data</code></p>
</td>
</tr>
</table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.7.3.7"></a><h3>checksum:new</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (checksum:new checksum-type))
</pre></div>
<p>Undocumented</p>
<div class="refsect3">
<a name="id-1.1.7.3.7.4"></a><h4>Parameters</h4>
<div class="informaltable"><table><tr>
<td class="parameter_name"><p>checksum_type</p></td>
<td class="parameter_description">
<p></p>
<p>Passed as <code class="code">checksum-type</code></p>
</td>
</tr></table></div>
</div>
</div>
<div class="refsect2">
<a name="id-1.1.7.3.8"></a><h3>checksum:type-get-length</h3>
<div class="informalexample"><pre class="programlisting">(define-values (%return) (checksum:type-get-length checksum-type))
</pre></div>
<p>Gets the length in bytes of digests of type <em class="parameter"><code>checksum_type</code></em></p>
<div class="refsect3">
<a name="id-1.1.7.3.8.4"></a><h4>Parameters</h4>
<div class="informaltable"><table><tr>
<td class="parameter_name"><p>checksum_type</p></td>
<td class="parameter_description">
<p>a <span class="type">GChecksumType</span></p>
<p>Passed as <code class="code">checksum-type</code></p>
</td>
</tr></table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>
